colorbutton: Remove .activatable style class from the color swatch
authornana-4 <hnmaigo@gmail.com>
Fri, 7 Aug 2020 23:37:33 +0000 (08:37 +0900)
committernana-4 <hnmaigo@gmail.com>
Fri, 7 Aug 2020 23:37:33 +0000 (08:37 +0900)
The button itself is activatable, but its color swatch is not.

gtk/gtkcolorbutton.c

index f117d8bef7789e826f922ab537d819648c1b53ea..511f26bd59013e0f7fddff837e585d49bfc6361a 100644 (file)
@@ -272,6 +272,7 @@ gtk_color_button_init (GtkColorButton *button)
 
   button->swatch = gtk_color_swatch_new ();
   gtk_widget_set_can_focus (button->swatch, FALSE);
+  gtk_widget_remove_css_class (button->swatch, "activatable");
   g_object_set (button->swatch, "has-menu", FALSE, NULL);
   layout = gtk_widget_create_pango_layout (GTK_WIDGET (button), "Black");
   pango_layout_get_pixel_extents (layout, NULL, &rect);